package top.lunarye.support.utils;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.core.RocketMQTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author lunar
 * @since 2022-07-12
 */
@Component
@Slf4j
public class RocketMQUtils {

    @Resource
    private RocketMQTemplate rocketMQTemplate;

    public void send(String destination, String payload) {
        rocketMQTemplate.convertAndSend(destination, payload);
    }
}
